package net.cl7.util;

public class CommonResult {


    private String code;
    private String message;

    private Object data;

    public CommonResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static CommonResult ok(){
        return new CommonResult("0", "successs");
    }

    public static CommonResult fail(){
        return new CommonResult("999", "fail");
    }

    public CommonResult setResult(Object data){
        this.data = data;
        return this;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
